%!TEX root = all.tex

\section{Discretization errors, consistency and order of accuracy}
As a result of the experiments, we quantify the \emph{discretization error}, its \emph{consistency} and order of accuracy of the Advect and Advance in Time (AAT) module of the ICE
(Implicity, Continuous fluid, Eulerian) algorithm developed by the C-SAFE (Center for
Simulations of Accidental Fires and Explosions) research group at the University of Utah.  The AAT transports the conserved physical quantities throughout the domain and advances the 
solution in time.
\\
\\
The approximate solution, which satisfies the discretized
equations, is not the same as the exact solution, which satisfies the mathematical
continuum equations. \emph{Discretization error} is the difference between the two \cite{R3}. We use
normalized L$_{2}$ and L$_{\infty}$ norms of the difference between exact solution of equation \ref{eq:maineq2} generated by MGS and approximate
solution computed using ICE, to evaluate the discretization errors.
\\
%Taken out via Todd's 1st comments
%\begin{figure}
%\begin{center}
%\framebox[100pt][c]{\Large Du = g}\\
%$\downarrow$\\
%\dashbox{3}(450,30)[c]{\parbox{0.9\textwidth}{\large Use a numerical solver or experimental data to construct approximate discrete solution {$\vec u$}}}\\
%$\downarrow$\\
%\framebox[100pt][c]{\Large $\vec u$}\\
%$\downarrow$\\
%\dashbox{3}(450,30)[c]{\parbox{0.9\textwidth}{\large Approximate $\vec u$ (using splines interpolation or least-squares approximations) to obtain analytic solution $u_{1}$}}\\
%$\downarrow$\\
%\framebox[100pt][c]{\Large $u_{1}$}\\
%$\downarrow$\\
%\dashbox{3}(450,30)[c]{\parbox{0.9\textwidth}{\large Differentiate $u_{1}$ to generate exact analytical derivatives $g_{1}$}}\\
%$\downarrow$\\
%\framebox[100pt][c]{\Large $Du_{1} = g_{1}$}\\
%$\downarrow$\\
%\dashbox{3}(450,30)[c]{\parbox{0.9\textwidth}{\large Use a numerical solver (solver that is being verified) to solve equation $Du_{1} = g_{1}$ and get $u_{2}$}}\\
%$\downarrow$\\
%\framebox[100pt][c]{\Large $u_{2}$}\\
%$\downarrow$\\
%\dashbox{3}(450,30)[c]{\parbox[c]{0.9\textwidth}{\large Compare $u_{1}$ and $u_{2}$.  Compute errors.}}\\
%$\downarrow$\\
%\framebox[100pt][c]{\Large $u_{1} - u_{2}$}\\
%
%\caption{Verification process using MGS method}
%%\includegraphics{images/mgsflow}
%\end{center}
%\end{figure}
%\hfill

In the 3 dimensional problem NxNxN cartesian cells were used and the L$_{2}$ norm was computed with:

\begin{equation}
L_{2}(t) = \sqrt{\frac{1}{N^{3}}\sum_{n=1}^{N^3}(u_n - U_n)^2} 
\end{equation}

%\clearpage
\noindent L$_{\infty}$ norm at timestep t is defined as:

\begin{equation}
L_{\infty}(t) = max|u_n - U_n|
\end{equation}
where,
\begin{align*}
&\emph{u$_n$} - Exact\ solution\ evaluated\ at\ \emph{x$_n$, y$_n$, z$_n$}\\ 
&\emph{U$_n$} - Approximate\ solution\ of\ the\ discretized\ equation 
\end{align*}

\noindent Discretization methods are \emph{consistent} if the error goes to zero as the cell size decreases to
zero \cite{R3}.  To evaluate consistency of the discretization error, we run experiments
for various cell sizes and compute ratios of L$_2$ and L$_\infty$ norms.
\\
\\
\emph{Order of accuracy} is the rate at which the error decreases to zero. We use the following
formula to compute the order of accuracy, $\rho$:

\begin{equation}
\rho = \frac{\log(\frac{E_{grid_1}}{E_{grid_2}})}{\log({\gamma})}
\end{equation}
where,
\\
\begin{compactitem}
\item[] \hspace{57pt}$E_{grid_1}$ and $E_{grid_2}$ are global errors for grid$_1$ and grid$_2$
\item[] \hspace{57pt}$\gamma$ is the refinement ratio\\
\end{compactitem}

and given our experiment with 10 timesteps,
\begin{align*}
&Global\ Error\ is\ the\ max_{t=1...10}(L_{\infty}(t))
\end{align*}
